<div class="spage-main-box">
<div class="tableform">

<div style="display: none;"><button class="btn" type="button" onclick="new Dialog('index.php?app=ome&ctl=admin_check&act=showmemo&p[0]=<{$dly.delivery_id}>',{title:'打回发货单备注',width:600,height:500})"><span><span>终止发货</span></span></button></div>


<form name="form1" id="form1" method="POST" action="index.php?app=ome&ctl=admin_check&act=doCheck">
<h3 style="border-bottom:none">商品信息</h3>
<div class="gridlist">
<table border="0" cellspacing="0" cellpadding="0">
<!--GOODSINOF_BEGIN-->
<thead>
<tr>
    <th >货号:</th>
    <th >条形码:</th>
    <th >货品名称:</th>
    <th >货品规格:</th>
    <th >货品数量:</th>
    <th >已校验数:</th>
</tr>
</thead>
<tbody>
<{foreach from=$items item=item}>
<tr id="_<{$item.barcode}>">
    <td><{$item.bn}></td>
    <td><div id="<{$item.barcode}>"><{$item.barcode}></div></td>
    <td><{$item.product_name}></td>
    <td><{$item.spec_info}></td>
    <td><font color="red"><div id="<{$item.barcode}>_all"><{$item.number}></font></td>
    <td><font color="red"><div id="<{$item.barcode}>_num"><{$item.number}></div></font></td>
</tr>
<{/foreach}>
</tbody>
<!--GOODSINOF_END-->
</table>
</div>
<input type="hidden" name="delivery_id" value="<{$dly.delivery_id}>" />
<input type="hidden" id="count" name="count" value="<{$count}>" />
<input type="hidden" id="number" name="number" value="<{$count}>" />
<input type="hidden" id="return" name="return" value="OK" />

<input type="hidden" name="logi_no" value="<{$dly.logi_no}>"/>



<div class="table-action">
<!--BUTTON_start-->
<{button label="校验完成" id="subtn" type="submit"}>
<!--BUTTON_end-->
</div>
</form>

</div>
</div><!--PAGE_END-->

<script>
$('form1').store('target',{
    onRequest:function(){
       $('subtn').set('disabled', 'true');
       $('subtn').getElements('span')[1].set('text','提交中');
    },
    onComplete:function(jsontext){
       var json = Json.evaluate(jsontext);
       if (typeof(json.error) != 'undefined'){
           $('subtn').set('disabled', '');
           $('subtn').getElements('span')[1].set('text','校验完成');
       }else{
           if (json.success.indexOf('校验完成') >= 0){
               $('subtn').set('disabled', 'true');
           }else {
               $('subtn').set('disabled', '');
           }
           $('subtn').getElements('span')[1].set('text','校验完成');
       }

    }
});
</script>